/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package noodlesscm;

import java.io.FileOutputStream;
import java.io.PrintStream;


class guiprosave extends AddProduct
{
    void savetoffile()
    {
        String id=t1.getText(),desc=t2.getText(),name=t3.getText(),rmrq=t4.getText();
        FileOutputStream fos;
        PrintStream ps;
		try{
			fos=new FileOutputStream("guiproduct.txt",true);
			ps=new PrintStream(fos);

//			ps.println(id+","+name+","+desc+","+rmrq+","+price+","+stock);
                        ps.println(id+","+name+","+desc+","+rmrq);
			fos.close();
			System.out.println("Successfully added one product...");
		}
 		catch(Exception ex)
 		{
 			System.out.println("Error");
 		}
    }
}
